

<div class="row">
	<div class="col-md-12">
		<div class="page-header">
			<h1>Posting Job</h1>
		</div>
		
			<?php echo form_open("admin_khmerhr/postJob",'class="form-horizontal"');?>
			 	<?php
					if($this->session->flashdata("message_success")){
						echo '<div class="form-group no_margin_button">';
						echo '<div class="col-md-8">';
						echo $this->session->flashdata("message_success");
						echo '</div></div>';
					}

				 ?>
				 <div class="form-group no_margin_button">
					<div class="col-sm-4" id="mgs">
					</div>
				</div>
			 	<div class="form-group no_margin_button"> 
			 		<div class="col-sm-4">
			 		 	<input type="radio" id="oldCompanyId"   checked  data-target="#oldCompany" name="companyExit"/><label class="control-label">&nbsp;Company name already exists</label> 
			 		</div>
			 		<div class="col-sm-4">
			 			<input type="radio" id="newCompanyId" data-target="#newCompany" name="companyExit"/> <label class="control-label">&nbsp;Create New Company</label>
			 		</div>
			 	</div>
			 	<?php echo form_close() ?>
			 	<div class="tab-content tab_contents">
			 		<div role="tabpanel" class="tab-pane active" id="oldCompany" >
			 			<?php echo form_open("admin_khmerhr/savePostJob",'class="form-horizontal" id="formPostOldCom" ');?>
			 			
			 			<div class="form-group no_margin_button">
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Company Name *</label>
							    <?php
							  		$arrCom = array(""=>"-- Please Select One --");
									foreach ($companyExits->result() as $key => $row_com) {
									 	$arrCom[$row_com->com_id] = $row_com->com_name;
									}
								?>
								<?php echo form_dropdown('comName',$arrCom,set_value('comName'),'class="form-control  input-sm " id="select_com"'); ?>
							  	<span class="txt_red" id="comName">
							  		
							  	</span>
						   </div>
						    <div class="col-sm-4">
						    	 <label for="jobType" class="control-label no-padding-right">Job Type *</label>
							   
							  	<?php
							  		$arrJobTime = array(""=>"-- Please Select One --");
									foreach (getJobTime()->result() as $key => $row_jobType) {
									 	 $arrJobTime[$row_jobType->job_time_id] = $row_jobType->job_time_name;
									 } 
								?>
								 <?php echo form_dropdown('jobType',$arrJobTime,'','class="form-control  input-sm "'); ?>
							  	<span class="txt_red" id="jobType">
							  		
							  	</span>
						   </div>
						</div>
						<div class="form-group no_margin_button" id="aboutCompany">
						        
						</div> 
						<div class="form-group no_margin_button">
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Job Title *</label>
							    <?php echo form_input('jobTitle','','class="form-control  input-sm " placeholder="Type Your Job Tittle"'); ?>
							  	<span class="txt_red" id="jobTitle">
							  		
							  	
							  		
							  	</span>
						   </div>    
						   <div class="col-sm-4">
						    	 <label for="jobType" class="control-label no-padding-right">Employee *</label>
							   
							  	<?php
							  		$arrEm1 = array(""=>"-- Please Select One --");
									foreach (getAllEmployee()->result() as $key => $row_employee) {
									 	 $arrEm1[$row_employee->id] = $row_employee->first_name.' '.$row_employee->last_name;
									 } 
								?>
								 <?php echo form_dropdown('employee',$arrEm1,'','class="form-control  input-sm "'); ?>
							  	<span class="txt_red" id="employee">
							  		
							  	</span>
							</div>
						</div>
						<div class="form-group no_margin_button">
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Post Date*</label>
									<div class='input-group date postJobId' id="">
										
										<?php echo form_input('post_date','','class="form-control  input-sm "  placeholder=""'); ?>
										<span class="input-group-addon">
											<span class="glyphicon glyphicon-calendar"></span>
										</span>
									</div>

							  	<span class="txt_red" id="post_date">
							  		
							  	</span>
						   </div>
						    <div class="col-sm-4">
						    	 <label for="jobType" class="control-label no-padding-right">Close Date *</label>
							  	
									<div class='input-group date closeDate' id="">
										
										<?php echo form_input('close_date','','class="form-control  input-sm " placeholder=""'); ?>
										<span class="input-group-addon">
											<span class="glyphicon glyphicon-calendar"></span>
										</span>
									</div>

							  	<span class="txt_red" id="close_date">
							  		
							  	</span>
						   </div>
						</div>
						<div class="form-group no_margin_button">
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Salary</label>
							    <?php echo form_input('salary','','class="form-control  input-sm " placeholder="Salary Range"'); ?>
						   </div>
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Of Hiring</label>
							    <?php echo form_input('hiring','','class="form-control  input-sm " placeholder="Number of Hiring"'); ?>
						   </div>
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
							 <label for="firstName" class="control-label no-padding-right">Provinces * 

							 </label>
							 <span class="txt_red" id="provinces">
							  		
							 </span>
							 	<ul class="nav_inline">
									<?php
										foreach (getLocation()->result() as $key => $row_location) {
										 	echo '<li>'.form_checkbox("provinces[]",$row_location->locationID).'&nbsp;'. $row_location->locationName.'</li>';
										 } 
									?>
								</ul>
								
							</div>
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
							  <label for="firstName" class="control-label no-padding-right">Categories * 

							  </label>
							  <span class="txt_red" id="cates">
							  		
							  	</span>
							 	<ul class="nav_inline">
									<?php
										foreach (getJobType()->result() as $key => $row_cate) {
										 	echo '<li>'.form_checkbox("cates[]",$row_cate->jobTypeID).'&nbsp;'. $row_cate->jobTypeName.'</li>';
										 } 
									?>
								</ul>
								
							</div>
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">Duty / Responsibility</label>
							    <?php echo form_textarea('duty','','class="form-control  input-sm " placeholder=""'); ?>
							  	
						   </div>   	
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">Requirement / Qualification</label>
							    <?php echo form_textarea('requirement','','class="form-control  input-sm " placeholder=""'); ?>
							  	
						   </div> 	
						</div>
						<div class="form-group">
							<div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">How to apply</label>
							    <?php echo form_textarea('howToApply','','class="form-control  input-sm " placeholder=""'); ?>
							  	
						   </div>   	
						</div>
						<div class="form-group">
							<div class="col-md-2">
								<?php echo form_submit('submit','Publich','class="btn btn-info" id="postOldCompany" placeholder="Contact Person"'); ?>
							</div>
						</div>
						</form>
			 		</div>
			 		 <div role="tabpanel" class="tab-pane" id="newCompany" >
			 		 	<?php echo form_open_multipart("admin_khmerhr/postJobNewCompany",'class="form-horizontal" id="formNewComapany"');?>
						<div class="form-group no_margin_button">
				  
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Company Name *</label>
							    <?php echo form_input('comName','','class="form-control  input-sm " placeholder="Type your company name"'); ?>
							  	<span class="txt_red" id="comName1">
							  		
							  	</span>
						   </div>
						    <div class="col-sm-4">
						    	<label for="firstName" class="control-label no-padding-right">Logo *</label>
						    	<input type="file" name="userfile" class="form-control" size="20" requited />
						    	<span class="txt_red" id="userfile1">
							  		
							  	</span>
						    </div>
						</div>
						<div class="form-group no_margin_button">
						    <div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">About Company</label>
							    <?php echo form_textarea('aboutCompany','','class="form-control  input-sm " placeholder="About Company"'); ?>
							  	
						   </div>     
						</div>
						<div class="form-group no_margin_button">
						    <div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">Job Title *</label>
							    <?php echo form_input('jobTitle','','class="form-control  input-sm " placeholder="First Name"'); ?>
							  	<span class="txt_red" id="jobTitle1">
							  		
							  	</span>
						   </div>
						</div>
						<div class="form-group no_margin_button">
						    
						   <div class="col-sm-4">
						    	 <label for="jobType" class="control-label no-padding-right">Job Type *</label>
							   
							  	<?php
							  		$arrJobTime = array(""=>"-- Please Select One --");
									foreach (getJobTime()->result() as $key => $row_jobType) {
									 	 $arrJobTime[$row_jobType->job_time_id] = $row_jobType->job_time_name;
									 } 
								?>
								 <?php echo form_dropdown('jobType',$arrJobTime,'','class="form-control  input-sm "'); ?>
							  <span class="txt_red" id="jobType1">
							  		
							  	</span>
						   </div>
						   <div class="col-sm-4">
						    	 <label for="jobType" class="control-label no-padding-right">Employee *</label>
							   
							  	<?php
							  		$arrEm = array(""=>"-- Please Select One --");
									foreach (getAllEmployee()->result() as $key => $row_employee) {
									 	 $arrEm[$row_employee->id] = $row_employee->first_name.' '.$row_employee->last_name;
									 } 
								?>
								 <?php echo form_dropdown('employee',$arrEm,'','class="form-control  input-sm "'); ?>
							  	<span class="txt_red" id="employee1">
							  		
							  	</span>
						   </div>   
						</div>
						<div class="form-group no_margin_button">
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Post Date*</label>
									<div class='input-group date postJobId' id="">
										
										<?php echo form_input('post_date','','class="form-control  input-sm "  placeholder=""'); ?>
										<span class="input-group-addon">
											<span class="glyphicon glyphicon-calendar"></span>
										</span>
									</div>

							 	<span class="txt_red" id="post_date1">
							  		
							  	</span>
						   </div>
						    <div class="col-sm-4">
						    	 <label for="jobType" class="control-label no-padding-right">Close Date *</label>
							  	
									<div class='input-group date closeDate' id="">
										
										<?php echo form_input('close_date','','class="form-control  input-sm " placeholder=""'); ?>
										<span class="input-group-addon">
											<span class="glyphicon glyphicon-calendar"></span>
										</span>
									</div>

							  	<span class="txt_red" id="close_date1">
							  		
							  	</span>
						   </div>
						</div>
						<div class="form-group no_margin_button">
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Salary</label>
							    <?php echo form_input('salary','','class="form-control  input-sm " placeholder="First Name"'); ?>
						   </div>
						    <div class="col-sm-4">
						    	 <label for="firstName" class="control-label no-padding-right">Of Hiring</label>
							    <?php echo form_input('hiring','','class="form-control  input-sm " placeholder="First Name"'); ?>
						   </div>
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
							 	<label for="firstName" class="control-label no-padding-right">Provinces *</label>
							 	<span class="txt_red" id="provinces1">
							 	</span>
							 	<ul class="nav_inline">
									<?php
										foreach (getLocation()->result() as $key => $row_location) {
										 	echo '<li>'.form_checkbox("provinces[]",$row_location->locationID).'&nbsp;'. $row_location->locationName.'</li>';
										 } 
									?>
								</ul>
								
							</div>
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
							 	<label for="firstName" class="control-label no-padding-right">Categories *</label>
							 	<span class="txt_red" id="cates1">
							 	</span>
							 	<ul class="nav_inline">
									<?php
										foreach (getJobType()->result() as $key => $row_cate) {
										 	echo '<li>'.form_checkbox("cates[]",$row_cate->jobTypeID).'&nbsp;'. $row_cate->jobTypeName.'</li>';
										 } 
									?>
								</ul>
								
							</div>
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">Duty / Responsibility</label>
							    <?php echo form_textarea('duty','','class="form-control  input-sm " placeholder=""'); ?>
							  	
						   </div>   	
						</div>
						<div class="form-group no_margin_button">
							<div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">Requirement / Qualification</label>
							    <?php echo form_textarea('requirement','','class="form-control  input-sm " placeholder=""'); ?>
							  	
						   </div> 	
						</div>
						<div class="form-group">
							<div class="col-sm-8">
						    	 <label for="firstName" class="control-label no-padding-right">How to apply</label>
							    <?php echo form_textarea('howToApply','','class="form-control  input-sm " placeholder=""'); ?>
							  	
						   </div>   	
						</div>
						<div class="form-group">
							<div class="col-md-2">
								<?php echo form_submit('submit','Publich','class="btn btn-info" placeholder="Contact Person"'); ?>
							</div>
						</div>
						<?php echo form_close(); ?>
					</div>
				</div>
		</div>		
				
</div>







